<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><{$title}></title>
<link href="css/table.css" rel="stylesheet" type="text/css"/>
<link href="../favicon.ico" type="image/x-icon" rel="icon" />
<link href="../favicon.ico" type="image/x-icon" rel="shortcut icon" />
<!-- 提示框-->
<link href="../js/Prompt/skin/ymPrompt.css" rel="stylesheet" id='skin' type="text/css"/>
<script language="javascript" charset="utf-8" type="text/javascript" src="../js/Prompt/ymPrompt.js"></script>
<!-- 复选框-->
<script language="javascript" charset="utf-8" src="js/checkbox.js" type="text/javascript"></script>
<!-- JQuery-->
<script language="javascript" charset="utf-8" src="../js/jquery.min.js" type="text/javascript"></script>
<!-- 验证-->
<script language="javascript" charset="utf-8" src="js/proving.js" type="text/javascript"></script>
<!-- AJAX操作js -->
<script language="javascript" charset="utf-8" src="js/ajax.do.js" type="text/javascript"></script>

</head>
<body>
<{if $mod eq "edit"}>


<form id="admin_edit" name="admin_edit" method="post" action="admin.php?mod=edit&pid=<{$pid}>&page=<{$page}>" onsubmit="return admininput(this)">
<table width="100%" border="0"  cellpadding="1" cellspacing="1">
    <tr>
      <th colspan="4">后台管理员 <span class="jiacu"><{$titleAct}></span></th>
    </tr>
    <{if $one.adminid ne 0}>
    <tr>
      <td width="15%" class="td6" >原管理员用户名：</td>
      <td width="35%" class="td5" >
      	<input type="text"  name="formeruser" id="formeruser" onblur="return chk_admin(this.value,'','<{$one.adminid}>');"	value="<{$one.username}>" class="put150"/>
      	<span id="fuser_cue" class="xinghao">*</span>
      </td>
      <td width="15%" class="td6" >原管理员密码：</td>
      <td width="35%" class="td5" >
     	<input type="password"  name="formerpwd" id="formerpwd" class="put150"/>
     	<span class="xinghao">*</span>
     	<img src="images/btn/edits.png" title="重置密码" onclick="return resetPwd('<{$one.adminid}>');">
      </td>
    </tr>
    <{/if}>
    <tr>
      <td width="15%" class="td6" >新管理员用户名：</td>
      <td width="35%" class="td5" >
      	<input type="text"  name="newuser" onblur="return chk_admin('',this.value,'<{$one.adminid}>');" onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5\w]/g,'')" id="newuser" value="<{$one.username}>" class="put150"/>
      	<span id="user_cue" class="xinghao">*</span>
      </td>
      <td width="15%" class="td6" >新管理员密码：</td>
      <td width="35%" class="td5" >
      	<input type="password"  name="newpwd" id="newpwd" onkeyup="this.value=this.value.replace(/\s/g,'');" class="put150"/>
      	<span class="xinghao">*</span>
      </td>
    </tr>
    <tr>
      <td class="td6">再次确认用户名：</td>
      <td class="td5" >
      	<input type="text"  name="newuser1" id="newuser1" onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5\w]/g,'')" value="<{$one.username}>" class="put150"/>
      	<span class="xinghao">*</span>
      </td>
      <td class="td6">再次确认密码：</td>
      <td class="td5" >
      	<input type="password"  name="newpwd1" id="newpwd1" onkeyup="this.value=this.value.replace(/\s/g,'');" class="put150"/>
      	<span class="xinghao">*</span>
      </td>
    </tr>

    <tr>
      <td class="td6">新管理员的昵称：</td>
      <td class="td5" >
	      <input type="text"  name="newnickname" id="newnickname" value="<{$one.realname}>" onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5\w]/g,'')" class="put150"/>
	      <span class="xinghao">*</span>
      </td>

      <td class="td6">管理员的权限：</td>
      <td class="td5" >
      <{if $adminPower lt 1}>
      	<input type="radio" name="permission_num" class="radios" value="0" <{if $one.permission ne 1}>checked<{/if}> />系统
	  	<input type="radio" name="permission_num" class="radios" value="1" <{if $one.permission eq 1}>checked<{/if}> />网站
      <{else}>
     <{if $one.permission ne 1 and $one.permission ne ""}>
     <input type="radio" name="permission_num" class="radios" value="0" checked />系统<{else}>
     <input type="radio" name="permission_num" class="radios" value="1" checked />普通<{/if}>
      <{/if}>

	    </td>

    </tr>

    <tr>
      <td width="20%" class="td6">新管理员的手机：</td>
      <td width="30%" class="td5" >
	      <input type="text" name="phone"  value="<{$one.tel}>" onkeyup="this.value=this.value.replace(/\D/g,'');" class="put150"/>
      </td>

      <td width="20%" class="td6">管理员的邮箱：</td>
      <td width="30%" class="td5" >
	    <input type="text" name="email" id="email" onkeyup="this.value=this.value.replace(/\s/g,'');" <{if $one.adminid ne 0}>readonly="readonly"<{/if}> value="<{$one.email}>" class="put150"/>
	    <span class="xinghao">*</span>
	  </td>

    </tr>

    <tr>
      <td colspan="4" class="td4">
	    <input type="hidden" name="act" id="act" value="change" />
		<input type="hidden" name="actId" id="infoid" value="<{if $one.adminid ne 0}><{$one.adminid}><{/if}>" />
		<input type="submit" name="okay" id="appent" value=" 保 存 " class="btn" />
		<input type="button" value=" 返回 " class="btn" onclick="javascript:window.location.href='<{$Returnfpage}>'" />
      </td>
    </tr>
  </table>
</form>


<{else}>
 <!--管理员列表-->
 <form id="admin" name="admin" method="post" action="admin.php" >
<table width="100%" border="0"  cellpadding="1" cellspacing="1">
  <tr>
  	<th><input type="button" name="addone" value=" 添加 " class="btn" onClick="javascript:window.location.href='admin.php?mod=edit&act=add';"/></th>
    <th colspan="10">后台管理员</th>
  </tr>
  <tr>
    <td width="5%" class="td2" >
    <input type="checkbox" id="chkAll" onclick="return CheckAll(this.form);" value="checkbox"/>
    </td>
    <td width="5%" class="td2" >UID</td>
    <td width="10%" class="td2">用户名</td>
    <td width="10%" class="td2" >登录次数</td>
    <td width="10%" class="td2" >昵称</td>
    <td width="5%" class="td2">状态</td>
    <td width="5%" class="td2" >权限</td>
    <td width="15%" class="td2">注册时间</td>
    <td width="15%" class="td2">最新登录时间</td>
    <td width="10%" class="td2">最新登录IP</td>
    <td width="10%" class="td2">操作</td>
  </tr>

  <{foreach from=$adminInfo item=item}>
  <tr class="out" onmouseover="this.className='over'" onmouseout="this.className='out'">
    <td  class="td4" >
    <input type="checkbox" name="del[]" value="<{$item.adminid}>"/>
    </td>
    <td  class="td4" ><{$item.adminid}></td>
    <td  class="td4" ><{$item.username}></td>
    <td  class="td4" ><{$item.login_num}>次</td>
    <td  class="td4" ><{$item.realname}></td>
    <td class="td4">
	<{if $item.state eq "0"}>
	<!-- 不显示 -->
	<img src="images/btn/ishow_no.png" title="点击激活账户" onclick="javascript:window.location.href='admin.php?mod=ishow&ishowId=1&adminid=<{$item.adminid}>';">
	<{elseif $item.state eq "1"}>
	<!-- 显示 -->
	<img src="images/btn/ishow_ok.png" title="点击冻结账户" onclick="javascript:window.location.href='admin.php?mod=ishow&ishowId=0&adminid=<{$item.adminid}>';">
	<{else}>
	<!-- 不显示 -->
	<img src="images/btn/ishow_no.png" title="点击激活账户" onclick="javascript:window.location.href='admin.php?mod=ishow&ishowId=1&adminid=<{$item.adminid}>';">
	<{/if}>
    </td>
    <td  class="td4" >
    <{if $item.permission eq 0}><span class="xinghao">系统</span>
    <{else}><span class="jiacu">普通</span>
    <{/if}>
    </td>
    <td  class="td4" ><{$item.regtime|date_format:'%Y-%m-%d %H:%M:%S'}></td>
    <td  class="td4" >
    <{if $item.logintime ne ""}>
    <{$item.logintime|date_format:'%Y-%m-%d %H:%M:%S'}>
    <{else}>0000-00-00 00:00:00
    <{/if}>
    </td>
    <td  class="td4" ><{$item.modify_ip}></td>
    <td  class="td4" >
    <img src="images/btn/trun.gif" title="修改"
    onclick="javascript:window.location.href='admin.php?mod=edit&act=update&pid=<{$item.adminid}>&page=<{$page}>';"/>
    <img src="images/btn/del.gif" title="删除" onclick="return DelOneadmin(<{$item.adminid}>);"/>
    </td>
  </tr>
<{foreachelse}>
  <tr class="out" onmouseover="this.className='over'" onmouseout="this.className='out'">
    <td colspan="11" class="td4">
      		<img src="images/btn/msg.gif"/>&nbsp;<span class="xinghao">您还没有添加，请点击左上角</span><span class="remindbtn">&nbsp;添加&nbsp;</span>
    </td>
  </tr>
<{/foreach}>


	  <tr>
	    <td class="td2" >
		<input type="submit" name="delall"  value=" X " class="delbtn" onClick="return confirm('系统提示:您确认删除吗?')" />
		</td>
	    <td colspan="10" class="td5">&nbsp;</td>
	  </tr>

  <tr>
    <td colspan="11" class="td3" >&nbsp;</td>
  </tr>
</table>
</form>

<{/if}>
</body>
</html>